﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace HRM.Controller
{
    public class Premium_Controller: Standard_Controller
    {
            #region "Contructor"
        private static Premium_Controller _instance;
        protected Premium_Controller() { }
        protected void Dispose()
        {
            _instance = null;
        }
        private static object _syncLock = new object();
        public static Premium_Controller Instance()
        {
            if (_instance == null)
            {
                lock (_syncLock)
                {
                    if (_instance == null)
                        _instance = new Premium_Controller();
                }
            }
            return _instance;
        }
        public static Premium_Controller Instance(String transName)
        {
            if (!String.IsNullOrEmpty(transName))
            {
                Premium_Controller _instanceTrans = new Premium_Controller();
                _instanceTrans.Trans_Name = transName;
                return _instanceTrans;
            }
            else
                return Instance();
        }
        #endregion
        public const String cs_Table_Name = "";

        public DataTable Premium_GetInputByDate(DateTime inputDate)
        {
            return DataConnect.ExecuteTable(DataConnect.WorkingConnect, Procedure_Name(cs_Table_Name, "HRM_Premium_GetInputByDate", false), inputDate);
        }

        public DataTable Premium_QTBH(string Branch_Code, string SIBookNo, int opt, DateTime FromDate, DateTime ToDate, int DocumentID)
        {
            return DataConnect.ExecuteTable(DataConnect.WorkingConnect, Procedure_Name(cs_Table_Name, "HRM_Premium_QTBH", false)
                , Branch_Code
                ,SIBookNo
                , opt
                ,FromDate
                ,ToDate
                ,DocumentID
                );
        }
    }
}
